home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3s / mbrchar.z / mbrchar
Encoding:
Text File  |  2002-10-03  |  11.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4. mmmmbbbbrrrrcccchhhhaaaarrrr((((3333SSSS))))                                                        mmmmbbbbrrrrcccchhhhaaaarrrr((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _mmmm_bbbb_rrrr_cccc_hhhh_aaaa_rrrr: _mmmm_bbbb_rrrr_llll_eeee_nnnn, _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc, _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb, _bbbb_tttt_oooo_wwww_cccc, _wwww_cccc_tttt_oooo_bbbb, _mmmm_bbbb_ssss_iiii_nnnn_iiii_tttt - multibyte
  10.      character handling (restartable)
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_wwww_cccc_hhhh_aaaa_rrrr_...._hhhh_>>>>
  14.  
  15.      _ssss_iiii_zzzz_eeee______tttt _mmmm_bbbb_rrrr_llll_eeee_nnnn _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_,,,, _mmmm_bbbb_ssss_tttt_aaaa_tttt_eeee______tttt _****_pppp_ssss_))))_;;;;
  16.      _ssss_iiii_zzzz_eeee______tttt _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc _((((_wwww_cccc_hhhh_aaaa_rrrr______tttt _****_pppp_wwww_cccc_,,,, _cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _ssss_iiii_zzzz_eeee______tttt _nnnn_,,,, _mmmm_bbbb_ssss_tttt_aaaa_tttt_eeee______tttt _****_pppp_ssss_))))_;;;;
  17.      _ssss_iiii_zzzz_eeee______tttt _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb _((((_cccc_hhhh_aaaa_rrrr _****_ssss_,,,, _wwww_cccc_hhhh_aaaa_rrrr______tttt _wwww_cccc_hhhh_aaaa_rrrr_,,,, _mmmm_bbbb_ssss_tttt_aaaa_tttt_eeee______tttt _****_pppp_ssss_))))_;;;;
  18.      _wwww_iiii_nnnn_tttt______tttt _bbbb_tttt_oooo_wwww_cccc_((((_iiii_nnnn_tttt _cccc_))))_;;;;
  19.      _iiii_nnnn_tttt _wwww_cccc_tttt_oooo_bbbb_((((_wwww_iiii_nnnn_tttt______tttt _cccc_))))_;;;;
  20.      _iiii_nnnn_tttt _mmmm_bbbb_ssss_iiii_nnnn_iiii_tttt_((((_cccc_oooo_nnnn_ssss_tttt _mmmm_bbbb_ssss_tttt_aaaa_tttt_eeee______tttt _****_pppp_ssss_))))_;;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      The _mmmm_bbbb_rrrr_llll_eeee_nnnn function determines the number of bytes that comprise the
  24.      multibyte character pointed to by _s, if _s is not a null pointer.  The
  25.      _mmmm_bbbb_rrrr_llll_eeee_nnnn function uses its own internal _m_b_s_t_a_t_e__t object if _p_s is a null
  26.      pointer, which is initialized at program startup.  Otherwise, the
  27.      _m_b_s_t_a_t_e__t object pointed to by _p_s is used to retain the current
  28.      conversion state of the multibyte character sequence.  The _mmmm_bbbb_rrrr_llll_eeee_nnnn
  29.      function returns 0 if the next _n or fewer bytes comprise the character
  30.      that corresponds to the null wide character, or it returns the positive
  31.      value of the number of bytes if the next _n or fewer bytes comprise a
  32.      valid multibyte character.  Also, if all _n bytes have been processed and
  33.      the _n bytes contribute to an incomplete but potentially valid multibyte
  34.      character, it returns (size_t)-2.  When an encoding error occurs, and the
  35.      next _n or fewer bytes do not contribute to a valid multibyte character,
  36.      it returns (size_t)-1, EILSEQ is stored in errno and the conversion state
  37.      is undefined.
  38.  
  39.      The _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc function converts the multibyte character to a wide character
  40.      and places the result in the object pointed to by _p_w_c. (The value of the
  41.      wide character corresponding to the null character is zero.)
  42.      The _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc function is equivalent to the call:
  43.      _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc_((((_NNNN_UUUU_LLLL_LLLL_,,,, _""""_""""_,,,, _1111_,,,, _pppp_ssss_))))_;;;;
  44.      if _s is a null pointer. The values of _p_w_c and _n are ignored.
  45.      If _s is not a null pointer, the _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc function processes at most _n
  46.      bytes beginning at the byte pointed to by _s to calculate the number of
  47.      bytes needed to comprise the next multibyte character.  If _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc finds
  48.      that the next multibyte character is valid, it determines the
  49.      corresponding wide character value and stores the value in the wide
  50.      character string object pointed to by _p_w_c, if _p_w_c is not a null pointer.
  51.      If the corresponding wide character is a null wide character, the
  52.      conversion state is initialized. The _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc function uses its own
  53.      internal _m_b_s_t_a_t_e__t object if _p_s is a null pointer, which is initialized
  54.      at program startup.  Otherwise, the _m_b_s_t_a_t_e__t object pointed to by _p_s is
  55.      used to retain the current conversion state of the multibyte character
  56.      sequence.
  57.      The _mmmm_bbbb_rrrr_tttt_oooo_wwww_cccc function returns 0, if the next _n or fewer bytes comprise the
  58.      character that corresponds to a null wide character, or it returns the
  59.      positive value of the number of bytes if the next _n or fewer bytes
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmbbbbrrrrcccchhhhaaaarrrr((((3333SSSS))))                                                        mmmmbbbbrrrrcccchhhhaaaarrrr((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      comprise a valid multibyte character. The corresponding wide character
  75.      value is stored in the object pointed to by _p_w_c, in those cases.
  76.      Also, if all _n bytes have been processed and the _n bytes contribute to an
  77.      incomplete but potentially valid multibyte character, it returns
  78.      (size_t)-2.  When an encoding error occurs, and the next _n or fewer bytes
  79.      do not contribute to a valid multibyte character, it returns (size_t)-1,
  80.      EILSEQ is stored in errno and the conversion state is undefined. In those
  81.      cases, no value is stored in the object pointed to by _p_w_c.
  82.  
  83.      The _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb function determines the number of bytes needed to represent
  84.      the multibyte character corresponding to the code whose value is _w_c_h_a_r,
  85.      and, if _s is not a null pointer, stores the multibyte character
  86.      representation in the array pointed to by _s. The _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb function is
  87.      equivalent to the call:
  88.      _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb_((((_bbbb_uuuu_ffff_,,,, _LLLL_'''' _''''_,,,, _pppp_ssss_))))_;;;;
  89.      if _s is a null pointer. (Where _b_u_f is an internal buffer.)
  90.      If _s is not a null pointer, _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb calculates the number of bytes needed
  91.      to represent the character corresponding to the wide character _w_c_h_a_r, and
  92.      stores the resulting bytes in the multibyte string object pointed to by
  93.      _s. At most MB_CUR_MAX bytes are stored. If _w_c_h_a_r is a null wide
  94.      character, a null byte is stored and the conversion state is initialized.
  95.      If _p_s is a null pointer, _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb uses its own internal mbstate_t object,
  96.      which is initialised at program startup. Otherwise, the mbstate_t object
  97.      pointed to by _p_s is used.  The _wwww_cccc_rrrr_tttt_oooo_mmmm_bbbb function returns the number of
  98.      bytes stored in the multibyte string object. When _w_c_h_a_r is not a valid
  99.      wide character, an encoding error occurs, and the function returns
  100.      (size_t)-1. In that case, EILSEQ is stored in errno and the conversion
  101.      state is undefined.
  102.  
  103.      The _bbbb_tttt_oooo_wwww_cccc function determines if _c comprises a valid multibyte character
  104.      which has only one byte. If _c has the value of EOF or does not comprise a
  105.      valid character, the function returns WEOF. Otherwise, it returns the
  106.      wide character value of the character.
  107.  
  108.      The _wwww_cccc_tttt_oooo_bbbb function determines if _c corresponds to one of the extended
  109.      character sets in which the multibyte character has only one byte. If _c
  110.      does not correspond to a multibyte character that has only one byte, it
  111.      returns EOF.  Otherwise, it returns the single byte character value of
  112.      the character.
  113.  
  114.      The _mmmm_bbbb_ssss_iiii_nnnn_iiii_tttt function determines if the mbstate_t object pointed to by _p_s
  115.      describes an initial conversion state. It returns a nonzero value if _p_s
  116.      is a null pointer or if the conversion state object describes an initial
  117.      state. Otherwise, it returns zero.
  118.  
  119. NNNNOOOOTTTTEEEESSSS
  120.      The behaviour of those functions is affected by the LC_CTYPE category of
  121.      the current locale.  (Stateful encodings are not supported in IRIX.)
  122.      Those functions are supported in n32 and 64 bit C Libraries for IRIX
  123.      6.5.17 and later versions.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. mmmmbbbbrrrrcccchhhhaaaarrrr((((3333SSSS))))                                                        mmmmbbbbrrrrcccchhhhaaaarrrr((((3333SSSS))))
  137.  
  138.  
  139.  
  140. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  141.      _wwww_cccc_hhhh_rrrr_tttt_bbbb_llll(1M), _mmmm_bbbb_cccc_hhhh_aaaa_rrrr(3C), _mmmm_bbbb_ssss_tttt_rrrr_iiii_nnnn_gggg(3C), _mmmm_bbbb_rrrr_ssss_tttt_rrrr_iiii_nnnn_gggg(3S), _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee(3C),
  142.      _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5).
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.